IF(BIICODE)
  INIT_BIICODE_BLOCK()
  ADD_BIICODE_TARGETS()
  IF(NOT WIN32)
    if (CMAKE_BUILD_TYPE STREQUAL "Debug")
      target_compile_options(${BII_BLOCK_TARGET} INTERFACE -Wall -g -ggdb -O0 )
    else()
      target_compile_options(${BII_BLOCK_TARGET} INTERFACE -Wall -O2 -DNDEBUG )
    endif()
  ENDIF()
  if(WIN32)
      TARGET_LINK_LIBRARIES(${BII_BLOCK_TARGET} INTERFACE shlwapi)
  else()
      TARGET_LINK_LIBRARIES(${BII_BLOCK_TARGET} INTERFACE pthread)
  endif()
ELSE()
cmake_minimum_required(VERSION 2.6)
project(log4z)

set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "")

set(LIB_SUFFIX "")
if (WIN32)
    if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
      set(LIB_SUFFIX "")
    else()
      set(LIB_SUFFIX "_d")
    endif()
else(WIN32)
  if (CMAKE_BUILD_TYPE STREQUAL "Debug")
    add_definitions(-Wall -g -ggdb -O0 )
    set(LIB_SUFFIX "_d")
  else()
    add_definitions(-Wall -O2 -DNDEBUG )
    set(LIB_SUFFIX "")
  endif()
endif(WIN32)

SET(LOG4Z_LIB_OUT_PATH ${log4z_SOURCE_DIR}/lib)
SET(LOG4Z_BIN_OUT_PATH ${log4z_SOURCE_DIR}/test/bin)

add_subdirectory(g++)
add_subdirectory(test)
ENDIF(BIICODE)